﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BKH.BLL;

namespace BKH.MyUserControl.UCHienThi
{
    public partial class ucBangCap : UserControl
    {
        private String IDNV;
        public ucBangCap()
        {
            InitializeComponent();
        }
        public ucBangCap(String IDNV)
        {
            InitializeComponent();
            this.IDNV = IDNV;
            ShowData();

        }

        void ShowData()
        {
            BangCapBUO bc = new BangCapBUO();
            NhanVienBUO nv = new NhanVienBUO();
            dataGridView1.DataSource = bc.GetAllByNV(int.Parse(IDNV));

            tbl_NhanVien obj=nv.GetSingle(int.Parse(IDNV));
            lblNhanVien.Text = obj.FirstName + " " + obj.LastName; 

        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ucHienThiNhanVien nv = new ucHienThiNhanVien();
            ControlAcess.ShowConTrol(this.ParentForm, nv, "gbHienThi");
        }
        
    }
}
